package com.adou.d8.d6;

import java.util.ArrayList;

public class StudentOperatorImpl1 implements StudentOperator{
    @Override
    public void printInfo(ArrayList<Student> students) {
        System.out.println("//////-全班全部学生信息////////");
        for (int i = 0; i < students.size(); i++) {
            System.out.println(students.get(i));
        }
    }

    @Override
    public void printScore(ArrayList<Student> students) {
        double avg = 0.0;
        for (int i = 0; i < students.size(); i++) {
            avg += students.get(i).getScore();
        }
        System.out.println("平均分：" +(avg/students.size()) );
    }
}
